downview.asp
来自「生成html的ASP企业站点,可以进行二次开发的」· ASP 代码 · 共 207 行
ASP
207 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/NoHackSql.Asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<%
call SiteInfo
if ISHTML = 1 then
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
End If
ID=request.QueryString("ID")
if ID <> "" or IsNumeric(ID) then
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Download where ViewFlag"&Language&" and ID="&ID
rs.open sql,conn,1,3
If rs("SeoKeywords"&Language) <> "" Then
SeoKeywords=rs("SeoKeywords"&Language)
Else
SeoKeywords=rs("DownName"&Language)
End If
If rs("SeoDescription"&Language) <> "" Then
SeoDescription=rs("SeoDescription"&Language)
Else
SeoDescription=rs("DownName"&Language)
End If
SeoTitle=rs("DownName"&Language)
End If
rs.close
set rs=nothing
headid=6
%>
<!--#include file="Head.Asp" -->
<div class="clear"></div>
<div id="contant">
<div class="cleft">
<div class="news">
<div class="title">
<b>下载分类</b>
</div>
<div>
<ul>
<%=WebMenu(0,0,2)%>
</ul>
</div>
</div>
<div class="news">
<div class="title">
<b>热门下载</b>
</div>
<div>
<ul>
<%=Downloadhot(10)%>
</ul>
</div>
</div>
</div>
<div class="cright">
<div class="crightb">
<div class="crightbtitle">
<div class="crightbtitlel">
当前位置:
</div>
<div class="crightbtitler">
<%=WebLocation()%>
</div>
</div>
<div class="crightbcontent">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="26"> </td>
<td>
<p>
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" border="0" heihgt="">
<tbody>
<tr>
<td>
<%
ID=request.QueryString("ID")
if ID="" or not IsNumeric(ID) then
response.write "<center>暂无相关信息</center>"
elseif conn.execute("select * from LiangJingCMS_Download Where ViewFlag"&Language&" and ID="&ID).eof then
response.write "<center>暂无相关信息</center>"
else
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Download where ViewFlag"&Language&" and ID="&ID
rs.open sql,conn,1,3
Response.Write ""&rs("DownName"&Language)&""&VbCrLf
End If
%>
</td>
</tr>
<tr>
<td>
<%
if ViewNoRight(rs("GroupID"),rs("Exclusive")) then
Response.Write " <tr>"&VbCrLf
Response.Write " <td align=""center"" style=""color:#999999""><strong>更新时间:</strong>"&FormatDate(rs("UpdateTime"),13)&" <strong>文件大小:</strong>"&rs("FileSize")&" <strong>浏览次数:</strong><script language=""javascript"" src=""HitCount.asp?id="&rs("ID")&"&LX=LiangJingCMS_Download""></script><script language=""javascript"" src=""HitCount.asp?action=count&LX=LiangJingCMS_Download&id="&rs("ID")&"""></script></td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " <tr>"&VbCrLf
Response.Write " <td height=""20""> </td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " <tr>"&VbCrLf
Response.Write " <td style=""line-height:25px; font-size:12px; padding-left: 8px; padding-right: 8px""><a href="""&rs("FileUrl")&"""><strong style=""color:red"">立即下载</strong></a></td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " <tr>"&VbCrLf
Response.Write " <td style=""line-height:25px; font-size:12px; padding-left: 8px; padding-right: 8px"">"&rs("Content"&Language)&"</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Else
Response.Write " <tr>"&VbCrLf
Response.Write " <td align=""center""><img src=""Images/NoRight.jpg""></td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
end if
rs.update
rs.close
set rs=nothing
%>
</td>
</tr>
</tbody>
</table>
</p>
</td>
<td width="26"> </td>
</tr>
<tr>
<td> </td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!--#include file="Foot.Asp"-->
<%
function WebMenu(ParentID,i,level)
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_DownSort where ViewFlag"&Language&" and ParentID="&ParentID&" order by ID asc"
rs.open sql,conn,1,1
if conn.execute("select ID from LiangJingCMS_DownSort Where ViewFlag"&Language&" and ParentID=0").eof then
response.write "暂无相关信息"
end if
do while not rs.eof
If ISHTML = 1 Then
AutoLink = ""&DownSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
Else
AutoLink = "DownList.asp?SortID="&rs("ID")&""
End If
if ParentID=0 then
response.write "<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href="""&AutoLink&""" target=""_blank"" style=""margin-left:5px;"">"&rs("SortName"&Language)&"</a></li>"
else
response.write string(i," ")&"<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href="""&AutoLink&""" target=""_blank"" style=""margin-left:5px;"">"&rs("SortName"&Language)&"</a></li>"
end if
i=i+1
if i<level then call WebMenu(rs("ID"),i,level)
i=i-1
rs.movenext
loop
rs.close
set rs=nothing
end function
function WebLocation()
WebLocation=" 当前位置:<a href=""index.asp"" class=""agray"">首页</a> - <a href=""DownList.asp"" class=""agray"">下载中心</a>"&VbCrLf
if request.QueryString("ID")="" then
WebLocation=WebLocation
elseif not IsNumeric(request.QueryString("ID")) then
WebLocation=WebLocation&"读取错误"
elseif conn.execute("select * from LiangJingCMS_Download Where ViewFlag"&Language&" and ID="&request.QueryString("ID")).eof then
WebLocation=WebLocation&"读取错误"
else
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Download where ViewFlag"&Language&" and ID="&request.QueryString("ID")
rs.open sql,conn,1,1
WebLocation=WebLocation&SortPathTXT("LiangJingCMS_DownSort",rs("SortID"))
rs.close
set rs=nothing
end if
end Function
function SortPathTXT(DataFrom,ID)
dim rs,sql
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From "&DataFrom&" where ViewFlag"&Language&" and ID="&ID
rs.open sql,conn,1,1
if not rs.eof Then
If ISHTML = 1 Then
AutoLink = ""&DownSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
Else
AutoLink = "DownList.asp?SortID="&rs("ID")&""
End If
SortPathTXT=SortPathTXT(DataFrom,rs("ParentID"))&" - <a href="""&AutoLink&"""><span style=""color:#EC0000"">"&rs("SortName"&Language)&"</span></a>"
end if
rs.close
set rs=nothing
end Function
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?