www.gusucode.com > 全球营销软件站整站源码4月最新数据 4.0源码程序 > 801wyxqf\8\previewimg.asp

    <!--#include file="config.asp" -->
<%
Dim Rs,SQL,softid,PreviewImg,SoftImageUrl,SoftName
Dim strUrl,HtmlFileUrl,HtmlFileName,ChannelRootDir,ChannelDirectory

If Not IsNumeric(Request("softid")) And Request("softid") <> "" then
	Response.Write"错误的系统参数!ID必须是数字"
	Response.End
Else
	softid = CLng(Request.querystring("softid"))
End If

If NewAsp.BindDomain = 0 Then
	ChannelRootDir = NewAsp.InstallDir & NewAsp.ChannelDir
	ChannelDirectory = NewAsp.ChannelDir
Else
	ChannelRootDir = "/"
	ChannelDirectory = ""
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.GetImagePath(Rs("Previewimg"), ChannelRootDir)
			PreviewImg = AnalyseImage(SoftImageUrl, 0, 0, SoftName)
		Else
			If Not IsNull(Trim(Rs("SoftImage"))) And Trim(Rs("SoftImage")) <> "" Then
				SoftImageUrl = NewAsp.GetImagePath(Rs("SoftImage"), ChannelRootDir)
				PreviewImg = AnalyseImage(SoftImageUrl, 0, 0, SoftName)
			Else
				PreviewImg = "<br/><li>对不起!没有图片预览。</li>"
			End If
		End If
		If CInt(NewAsp.IsCreateHtml) <> 0 Then
			HtmlFileUrl = NewAsp.HtmlDestination(NewAsp.InfoDestination, ChannelDirectory, 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

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; chaRset=gb2312">
<title><%= Trim(SoftName)%> 界面预览 - <%=NewAsp.MainSetting(1)%></title>
<style type="text/css">
<!--
a{
	font-size: 16px; text-decoration: none; color: #0033CC;
}
a:hover{
	font-size: 16px; text-decoration: underline; color: #FF6600;
}
.unnamed1 {
	font-size: 18px;
	line-height: 180%;
	font-weight: bold;
	color: #003399;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30" align="center"><a href="<%= Trim(strUrl)%>"><b><%= Trim(SoftName)%> 的软件界面</b></a></td>
  </tr>
  <tr>
    <td align="center"><a href="<%= Trim(strUrl)%>"><%= PreviewImg %></a></td>
  </tr>
  <tr>
    <td height="30" align="center"><a href="<%= Trim(strUrl)%>">点击此处进入 <%= Trim(SoftName)%> 的下载页面--==>></a></td>
  </tr>
</table>
</body>
</html>
<%
End If
Rs.Close
Set Rs=Nothing
End If
NewAsp.PageEnd()

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 = "<embed src=""" & url & """" & strWidth & strHeight & " />"
	Else
		strTemp = "<img src=""" & url & """" & strWidth & strHeight & m_strAlt & " border=""0"" />"
	End If
	AnalyseImage = strTemp
End Function
 %>