<!--#include file="Include/Const.Asp" -->
<!--#include file="Include/NoSQL.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 Shenbi_Download where ViewFlag and ID="&ID
    rs.Open sql, conn, 1, 3
    If rs("SeoKeywords") <> "" Then
        SeoKeywords = rs("SeoKeywords")
    Else
        SeoKeywords = rs("DownName")
    End If
    If rs("SeoDescription") <> "" Then
        SeoDescription = rs("SeoDescription")
    Else
        SeoDescription = rs("DownName")
    End If
    SeoTitle = rs("DownName")
End If
rs.Close
Set rs = Nothing
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><% =SeoTitle %> - <% =SiteTitle %></title>
<meta name="keywords" content="<% =SeoKeywords %>" />
<meta name="description" content="<% =SeoDescription %>" />
<link href="css/public.css" rel="stylesheet" type="text/css" />
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<!--#include file="Top.Asp" -->
<table width="1003" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:1px; background:url(images/main_bg.jpg) repeat-x;">
  <tr>
    <td width="230" align="left" valign="top" style="background:url(images/left_bg.gif) repeat-y right;"><table width="190" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:19px;">
        <tr>
          <td width="190"><img src="images/left_nav.gif" width="190" height="28" /></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF"><div id="nav"><%=WebMenu(0,0,2)%></div></td>
        </tr>
        <tr>
          <td height="18">&nbsp;</td>
        </tr>
      </table>
      <!--#include file="Center_Left.Asp" --></td>
    <td width="773" valign="top"><table width="733" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:19px;">
        <tr>
          <td width="733" style="background:url(images/bg1.gif) repeat-x left bottom;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="100%" align="right" style="color:#999999"><img src="images/arr6.gif" width="9" height="9" align="absmiddle" /><%=WebLocation()%></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td height="18">&nbsp;</td>
        </tr>
        <tr>
          <td><table width="733" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="30" height="36"><img src="images/title_bg1.gif" width="30" height="36" /></td>
                <td width="673" align="center" background="images/title_bg_center.jpg" style="color:#000000; font-size:14px; font-weight:bold"><%
ID = request.QueryString("ID")
If ID = "" Or Not IsNumeric(ID) Then
    response.Write "<center>暂无相关信息</center>"
ElseIf conn.Execute("select * from Shenbi_Download Where ViewFlag and  ID="&ID).EOF Then
    response.Write "<center>暂无相关信息</center>"
Else
    Dim rs, sql
    Set rs = server.CreateObject("adodb.recordset")
    sql = "select * from Shenbi_Download where ViewFlag and ID="&ID
    rs.Open sql, conn, 1, 3
    Response.Write ""&rs("DownName")&""&vbCrLf
End If
%></td>
                <td width="30"><img src="images/title_bg2.gif" width="30" height="36" /></td>
              </tr>
              <tr>
                <td><img src="images/title_bg3.gif" width="30" height="14" /></td>
                <td background="images/title_bg_center2.jpg">&nbsp;</td>
                <td><img src="images/title_bg4.gif" width="30" height="14" /></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td height="20">&nbsp;</td>
        </tr>
<%if ViewNoRight(rs("GroupID"),rs("Exclusive")) then%>
        <tr>
          <td><table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#E6E6E6">
              <tr height="25" bgcolor="#FFFFFF">
                <td width="80" align="right">文件名称：</td>
                <td style="padding-left: 8px"><%=rs("DownName")%></td>
              </tr>
              <tr height="25" bgcolor="#FFFFFF">
                <td width="80" align="right">更新时间：</td>
                <td style="padding-left: 8px"><%=FormatDate(rs("UpdateTime"),13)%></td>
              </tr>
              <tr height="25" bgcolor="#FFFFFF">
                <td width="80" align="right">文件大小：</td>
                <td style="padding-left: 8px"><%=rs("FileSize")%></td>
              </tr>
              <tr height="25" bgcolor="#FFFFFF">
                <td width="80" align="right">浏览次数：</td>
                <td style="padding-left: 8px"><script language="javascript" src="HitCount.Asp?id=<%=rs("ID")%>&LX=Shenbi_Download"></script>
                  <script language="javascript" src="HitCount.Asp?action=count&LX=Shenbi_Download&id=<%=rs("ID")%>"></script></td>
              </tr>
              <tr height="25" bgcolor="#FFFFFF">
                <td width="80" align="right">下载地址：</td>
                <td style="padding-left: 8px"><a href="<%=rs("FileUrl")%>"><img src="images/Download.gif" border="0" /></a></td>
              </tr>
              <tr height="25" bgcolor="#FFFFFF">
                <td width="80" align="right">相关说明：</td>
                <td style="padding-left: 8px" class="SiteLink"><%=ProcessSitelink(rs("Content"))%></td>
              </tr>
            </table></td>
        </tr>
<%Else%>
        <tr>
          <td align="center"><img src="Images/NoRight.jpg"></td>
        </tr>
<%
End If
rs.update
rs.Close
Set rs = Nothing
%>
        <tr>
          <td height="20">&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="End.Asp"-->
<%
Function WebMenu(ParentID, i, level)
    Dim rs, sql
    Set rs = server.CreateObject("adodb.recordset")
    sql = "select * from Shenbi_DownSort where ViewFlag and ParentID="&ParentID&" order by ID asc"
    rs.Open sql, conn, 1, 1
    If conn.Execute("select ID from Shenbi_DownSort Where ViewFlag and ParentID=0").EOF Then
        response.Write "<center>暂无相关信息</center>"
    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
        response.Write "<a href="""&AutoLink&""" class=""navA"">"&rs("SortName")&"</a>"&vbCrLf
        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 = "&nbsp;当前位置：<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 Shenbi_Download Where ViewFlag and  ID="&request.QueryString("ID")).EOF Then
        WebLocation = WebLocation&"读取错误"
    Else
        Dim rs, sql
        Set rs = server.CreateObject("adodb.recordset")
        sql = "select * from Shenbi_Download where ViewFlag and ID="&request.QueryString("ID")
        rs.Open sql, conn, 1, 1
        WebLocation = WebLocation&SortPathTXT("Shenbi_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 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")&"</span></a>"
    End If
    rs.Close
    Set rs = Nothing
End Function
%>