<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<TITLE><%=rs("dk_site_name")%></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content=<%=rs("dk_site_keywords")%> name=keywords>
<META content=<%=rs("dk_site_description")%> name=description>
<%
rs.close
set rs=nothing
%>
<LINK href="images/common.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.3640" name=GENERATOR></HEAD>
<BODY>
<DIV id=main>
<!--#include file="top.asp"-->
<div class="shuanger"><img src="images/zuoyueb.jpg" width=966></div>
<div style="height:10px;"></div>
<DIV class=shuanger9 style="border-top:1px #cccccc solid;">
<div class="shuanger1">
<div><img src="images/abc.png"></div>
<UL >
<%
set rs=conn.execute("select dk_news_category_name,dk_news_category  from dk_news_category where dk_news_category=1 or dk_news_category=2 order by dk_news_category_order asc")
do while not rs.eof
%>
  <LI ><A  href="newsz.asp?dk_news_category=<%=rs("dk_news_category")%>"><%=rs("dk_news_category_name")%></A> </LI>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>  
</UL></DIV>
<div class="shuanger5">

<h3><b>新闻中心</b></h3>
<ul>
<%
Set rs = server.CreateObject("adodb.recordset")
sql = "select * from dk_news where dk_news_category=1 or dk_news_category=2 order by dk_news_date desc"
rs.Open sql, conn, 1, 1
If rs.EOF Then
    response.Write "暂无新闻！"
Else
    rs.PageSize = 15
    allpage = rs.RecordCount
    iPageSize = rs.PageSize
    maxpage = rs.PageCount
    page = request("page")
    If Not IsNumeric(page) Or page = "" Then
        page = 1
    Else
        page = CInt(page)
    End If
    If page<1 Then
        page = 1
    ElseIf page>maxpage Then
        page = maxpage
    End If
    rs.AbsolutePage = Page
    If page = maxpage Then
        x = allpage - (maxpage -1) * iPageSize
    Else
        x = iPageSize
    End If
    For i = 1 To x
%>
<li>
<span class="shuanger5a"><font color="#FF0000">[<%=rs("dk_news_category_name")%>]</font><a href="shownews_<%=rs("id")%>.html">·<%=left(rs("dk_news_name"),50)%></a></span><span class="shuanger5b">[<%=rs("dk_news_date")%>]</span>
</li>
<%
rs.movenext
next
end if
rs.close
set rs=nothing
%>

</ul>
<ul>
<li style="border:none; text-align:center;padding-top:20px;">
<%
    action = "http://" & request.servervariables("http_host") & request.servervariables("script_name")
    query = Split(request.servervariables("query_string"), "&")
    For Each x in query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next
    response.Write("<table class='table'><form method=get onsubmit=""document.location = '" & action & "?" & temp & "page='+ this.page.value;return false;""><tr ><td align=center>")
    If page<= 1 Then
        response.Write ("首页 上一页 ")
    Else
        response.Write("<a href=" & action & "?" & temp & "page=1>首页</a> <a href=" & action & "?" & temp & "page=" & (page -1) & ">上一页</a> ")
    End If
    If page>= maxpage Then
        response.Write ("下一页 尾页 ")
    Else
        response.Write("<a href=" & action & "?" & temp & "page=" & (page+1) & ">下一页</a> <a href=" & action & "?" & temp & "page=" & maxpage & ">尾页</a> ")
    End If
    response.Write("页次：" & page & "/" & maxpage & "页 共计" & allpage & "条记录 " & "<input class=wenbenkuang tyep=text name=page size=3 maxlength=3 value=" & page & ">" & " 页 "  & "<input type=submit value=转到 /> </td></tr></form></table>")

%>
</li>
</ul>
</div>

</div>
<!--#include file="bottom.asp"-->
</DIV></BODY></HTML>
