%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% Option Explicit %>
<%session.CodePage="936"%>
<%
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)&"..."
else
morestr = str
end if
end function
Dim Conn,Old_News_Conn,User_Conn,Search_Sql,Search_RS,strShowErr,Cookie_Domain,Cookie_Copyright,Cookie_eMail,Cookie_Site_Name
Dim Server_Name,Server_V1,Server_V2,Server_V3
Dim TmpStr,TmpArr,SqlDateType,FileSize,FileEditDate,TmpStr1,TmpStr2
Dim Keyword,s_type,SubSys,ClassId,s_date,e_date ,GetType,AreaID,PubType
Dim ChildDomain,ClassPath
Dim LocalUrl,RDSqlDateType
Dim MsMinPric,MsMaxPric
Dim StringType
IF G_IS_SQL_DB = 1 Then
StringType = "SubString"
Else
StringType = "Mid"
End If
GetType = Server.HtmlEncode(request.QueryString("GetType"))''内部 '20140520安全补丁
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_NewsLinkRecordSet)
Dim f_NewsLink
Set f_NewsLink = New CLS_FoosunLink
get_NewsLink = f_NewsLink.NewsLink(f_NewsLinkRecordSet)
Set f_NewsLink = Nothing
End Function
'得到信息链接地址
Function GetTheInfoLink(InfoID,InfoType)
Dim LinkObj
Select Case InfoType
Case "DS"
Set LinkObj = New cls_DS
GetTheInfoLink = LinkObj.get_DownLink(InfoID)
Set LinkObj = Nothing
Case "MS"
Set LinkObj = New cls_MS
GetTheInfoLink = LinkObj.get_productsLink(InfoID)
Set LinkObj = Nothing
End Select
End Function
''得到相关表的值。
Function Get_OtherTable_Value(This_Fun_Sql)
Dim This_Fun_Rs
if instr(This_Fun_Sql," FS_ME_")>0 then
set This_Fun_Rs = User_Conn.execute(This_Fun_Sql)
else
set This_Fun_Rs = Conn.execute(This_Fun_Sql)
end if
if instr(lcase(This_Fun_Sql)," in ")>0 then
do while not This_Fun_Rs.eof
Get_OtherTable_Value = Get_OtherTable_Value & This_Fun_Rs(0) &" "
This_Fun_Rs.movenext
loop
else
if not This_Fun_Rs.eof then
Get_OtherTable_Value = This_Fun_Rs(0)
else
Get_OtherTable_Value = ""
end if
end if
set This_Fun_Rs=nothing
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 Left(LCase(PhFileName),7) = "http://" Then
CheckFile="|":exit Function
Else
IF Left(PhFileName,1) <> "/" Then
CheckFile="|":exit Function
End If
End If
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_User_Conn
MF_Old_News_Conn
Get_MF_Config
SubSys_Cookies:MFConfig_Cookies:NSConfig_Cookies:DSConfig_Cookies
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)
'20201225增加https支持
Server_V3 = Left(Replace(Cstr(Request.ServerVariables("HTTP_REFERER")),"https://",""),Server_Name)
Server_V2 = Left(Cstr(Request.ServerVariables("SERVER_NAME")),Server_Name)
if Server_V1 <> Server_V2 and Server_V2 <> Server_V3 and Server_V1 <> "" and Server_V2 <> "" then
response.Write("没有权限,请访问"&Cookie_Domain&".")
response.End()
end if
''+++++++++++++++++++++++++++++++++++++++++++
select case GetType
case "LoginHtml"
%>
<%
If session("FS_UserName") = "" Then
Response.Write("返回首页")
Else
Response.Write("返回首页")
'Response.Write("["&session("FS_UserName")&"]欢迎您来到会员中心")
End if
%>
<%case "FootHTML"%>
<%=Cookie_Copyright%>
<%case "CopyrightHTML"
TmpStr = "
"&vbNewLine _ &" |
<%=TmpStr%> | 共有0项符合<%=Keyword%>的查询结果 (搜索用时 <%=FormatNumber((timer()-starttime),2,-1)%>毫秒) |
未查询到符合条件的记录。
<%else Dim UrlAndTitle,SaveNewsPath,Content,NewsSmallPicFile,NewsPicFile,addtime,NaviContent ,SysRs_Tmp,ChildPath,picShuXing,picShuXingB Dim rndpic,DBUserName,sdnextdoman Search_RS.PageSize=int_RPP cPageNo=CintStr(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" Dim f_NewsLinkRecordSet Set f_NewsLinkRecordSet = New CLS_FoosunRecordSet Set f_NewsLinkRecordSet.Values("ClassEName,Domain,SavePath,IsURL,URLAddress,SaveNewsPath,FileName,FileExtName") = Search_RS SaveNewsPath = get_NewsLink(f_NewsLinkRecordSet) Set f_NewsLinkRecordSet = Nothing UrlAndTitle = ""&Search_RS("NewsTitle")&"" 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 = morestr(Lose_Html(NaviContent),255) If NaviContent <> "" Then NaviContent = Search_TextArr(Keyword,"Content",NaviContent) Else NaviContent = "详细内容请点击标题浏览" End If end if FileSize = split(CheckFile(LocalUrl),"|")(0) FileEditDate = split(CheckFile(LocalUrl),"|")(1) case "RD" SaveNewsPath = ""&Cookie_Domain&"/historynews.asp?id="&Search_RS("ID")&"" UrlAndTitle = ""&Search_RS("NewsTitle")&"" 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) If NaviContent <> "" Then NaviContent = Search_TextArr(Keyword,"Content",NaviContent) Else NaviContent = "详细内容请点击标题浏览" End If end if FileSize = "" FileEditDate = addtime case "WS" SaveNewsPath = ""&Cookie_Domain&"/historynews.asp?id="&Search_RS("ID")&"" UrlAndTitle = ""&Search_RS("Topic")&"" 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") SaveNewsPath = GetTheInfoLink(Search_RS("DownLoadID"),"DS") UrlAndTitle = ""&Search_RS("Name")&"" 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 = Cookie_Domain & "/" & 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") SaveNewsPath = GetTheInfoLink(Search_RS("ID"),"MS") UrlAndTitle = ""&Search_RS("ProductTitle")&"" 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) case "SD" sdnextdoman = Get_OtherTable_Value("select top 1 [Domain] from FS_SD_Config") if sdnextdoman<>"" then SaveNewsPath = "http://"&sdnextdoman&"/Supply.asp?id="&Search_RS("ID") else SaveNewsPath = ""&Cookie_Domain&"/Supply/Supply.asp?id="&Search_RS("ID") end if UrlAndTitle = "["&Replacestr(Search_RS("PubType"),"0:供应,1:求购,2:合作,3:代理,4:其它")&"] " _ &""&Search_RS("PubTitle")&"" addtime = Search_RS("Addtime") if isnull(addtime) then addtime="" if isdate(addtime) then addtime = FormatDateTime(addtime,0) randomize rndpic = Int(3 * Rnd + 1) NewsSmallPicFile = Search_RS("PubPic_"&rndpic) NewsPicFile = NewsSmallPicFile if NewsSmallPicFile = "" then NewsSmallPicFile = "sys_images/NoPic.jpg" NaviContent = Search_RS("PubContent") if isnull(NaviContent) or NaviContent="" then NaviContent = "暂无" else NaviContent = morestr(Lose_Html(NaviContent),255) NaviContent = Search_TextArr(Keyword,"PubContent",NaviContent) end if FileSize = "" FileEditDate = Search_RS("EditTime") Case "HS" Dim HsPicSql,HsPicRs sdnextdoman = Get_OtherTable_Value("select top 1 isDomain from FS_HS_SysPara") If LCase(HSType) = "quotation" Then if sdnextdoman<>"" then SaveNewsPath = "http://"&sdnextdoman&"/BuildingRead.asp?id="&Search_RS("ID") else SaveNewsPath = ""&Cookie_Domain&"/House/BuildingRead.asp?id="&Search_RS("ID") end if UrlAndTitle = ""&Search_RS("HouseName")&"" HsPicSql = "Select * From FS_HS_Picture Where HS_Type = 1 And ID = " & Search_RS("ID") ElseIf LCase(HSType) = "second" Then if sdnextdoman<>"" then SaveNewsPath = "http://"&sdnextdoman&"/SecondRead.asp?id="&Search_RS("SID") else SaveNewsPath = ""&Cookie_Domain&"/House/SecondRead.asp?id="&Search_RS("SID") end if UrlAndTitle = ""&Search_RS("Address")&"" HsPicSql = "Select * From FS_HS_Picture Where HS_Type = 3 And ID = "&Search_RS("SID") Else if sdnextdoman<>"" then SaveNewsPath = "http://"&sdnextdoman&"/HouseRead.asp?id="&Search_RS("TID") else SaveNewsPath = ""&Cookie_Domain&"/House/HouseRead.asp?id="&Search_RS("TID") end if UrlAndTitle = ""&Search_RS("Position")&"" HsPicSql = "Select * From FS_HS_Picture Where HS_Type = 2 And ID = "&Search_RS("TID") End If Set HsPicRs = Conn.ExeCute(HsPicSql) If HsPicRs.Eof Then NewsSmallPicFile = "" Else NewsSmallPicFile = HsPicRs("Pic") End If HsPicRs.Close : Set HsPicRs = Nothing NewsPicFile = NewsSmallPicFile if NewsSmallPicFile = "" then NewsSmallPicFile = "sys_images/NoPic.jpg" addtime = Search_RS("PubDate") if isnull(addtime) then addtime="" if isdate(addtime) then addtime = FormatDateTime(addtime,0) If LCase(HSType) = "quotation" Then NaviContent = Search_RS("introduction") Else NaviContent = Search_RS("Remark") End if if isnull(NaviContent) or NaviContent="" then NaviContent = "暂无" else NaviContent = morestr(Lose_Html(NaviContent),255) NaviContent = Search_TextArr(Keyword,"Remark",NaviContent) end if FileSize = "" FileEditDate = Search_RS("PubDate") end select Content=""&vbNewLine
'if NewsPicFile<>"" then
' picShuXingB = CheckFile(NewsPicFile)
'' if len(picShuXingB)>5 then picShuXingB = "["&picShuXingB&"]" else picShuXingB="" end if
' Content=Content&" | "&vbNewLine
'else
' Content=Content&""&vbNewLine _ &""&NaviContent&""&vbNewLine _ &" | "&vbNewLine _ &"
"&vbNewLine _ &""&SaveNewsPath&" - "&FileSize&" "&FileEditDate&" "&addtime&" " Content=Content &" | "&vbNewLine _ &"
<%=TmpStr%> | 共有<%=Search_RS.recordcount%>项符合 <%=morestr(Keyword,30)%> 的查询结果, 以下是第 1 - 10 项。(搜索用时 <%=FormatNumber((timer()-starttime),2,-1)%> 秒) |
<%
response.Write("【")
if SubSys="NS" then response.Write(""&Replacestr(Search_Rs("ClassName"),":,else:"&Search_Rs("ClassName")))
response.Write("】")
''标题
response.Write(UrlAndTitle)
'response.Write("")
select case SubSys
case "NS","RD"
'response.Write(" "&addtime&vbNewLine)
' response.Write(" ")
' 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: | |