<% Dim Rs,SQL,softid,PreviewImg,SoftImageUrl,SoftName Dim strUrl,HtmlFileUrl,HtmlFileName,ChannelRootDir If Not IsNumeric(Request("softid")) And Request("softid") <> "" then Response.Write"错误的系统参数!ID必须是数字" Response.End Else softid = CLng(Request.querystring("softid")) End If If Not IsObject(Conn) Then ConnectionDatabase If Newasp.BindDomain = "0" Then ChannelRootDir = Newasp.InstallDir & Newasp.ChannelDir Else ChannelRootDir = "/" End If If SoftID <> "" Then SQL="SELECT A.softid,A.classid,A.SoftName,A.SoftVer,A.SoftImage,A.Previewimg,A.HtmlFileDate,C.HtmlFileDir FROM NC_SoftList A INNER JOIN [NC_Classify] C On A.ClassID=C.ClassID WHERE A.ChannelID="& ChannelID &" And A.isAccept <> 0 And A.softid="&softid Set Rs = Newasp.Execute(SQL) If Not(Rs.EOF And Rs.BOF) Then SoftName = Trim(Rs("SoftName") & " " & Rs("SoftVer")) If Not IsNull(Trim(Rs("Previewimg"))) And Trim(Rs("Previewimg")) <> "" Then SoftImageUrl = Newasp.GetImageUrl(Rs("Previewimg"), ChannelRootDir) PreviewImg = AnalyseImage(SoftImageUrl, 0, 0, SoftName) 'PreviewImg = "" Else If Not IsNull(Trim(Rs("SoftImage"))) And Trim(Rs("SoftImage")) <> "" Then SoftImageUrl = Newasp.GetImageUrl(Rs("SoftImage"), ChannelRootDir) PreviewImg = AnalyseImage(SoftImageUrl, 0, 0, SoftName) Else PreviewImg = "
  • 对不起!没有图片预览。" End If End If If CInt(Newasp.IsCreateHtml) <> 0 Then HtmlFileUrl = Newasp.ReadDestination(Newasp.InfoDestination, Newasp.ChannelDir, Rs("HtmlFileDate"),Rs("HtmlFileDir"),Rs("ClassID"),Rs("softid"),1,"") strUrl = HtmlFileUrl Else If IsURLRewrite Then strUrl = ChannelRootDir & Rs("softid") & Newasp.HtmlExtName Else strUrl = ChannelRootDir & "show.asp?id="& Rs("softid") End If End If %> <%= Trim(SoftName)%> 界面预览 - <%=Newasp.SiteName%>
    <%= Trim(SoftName)%> 的软件界面
    <%= PreviewImg %>
    点击此处进入 <%= Trim(SoftName)%> 的下载页面--==>>
    <% End If Rs.Close Set Rs=Nothing End If CloseConn Function AnalyseImage(ByVal url, ByVal height, ByVal width, ByVal strAlt) On Error Resume Next Dim sExtName, ExtName, strTemp Dim strHeight, strWidth,m_strAlt If Not IsNumeric(height) Or height < 1 Then strHeight = "" Else strHeight = " height=""" & height & """" End If If Not IsNumeric(width) Or width < 1 Then strWidth = "" Else strWidth = " width=""" & width & """" End If If strAlt <> "" Then m_strAlt = " alt=""" & strAlt & """" End If sExtName = Split(url, ".") ExtName = sExtName(UBound(sExtName)) If LCase(ExtName) = "swf" Then strTemp = "" Else strTemp = "" End If AnalyseImage = strTemp End Function %>