<%@ page language="C#" autoeventwireup="true" inherits="inc_aspx_NewsDiscusList, App_Web_jk2znuje" enableEventValidation="false" %>
<% if(DataSource.Rows.Count>0){ %>
<table class="list" width="100%" cellpadding="0" cellspacing="0" border="0">
    <% int i = 0; %>
    <% foreach(System.Data.DataRow dr in DataSource.Rows){
           i++;
           %>
    <tr bgcolor="<%= i % 2 == 0 ? "white" : "" %>">
        <td width="70" rowspan="2" style="border-bottom:solid 1px #ccc;"><strong><%= dr["postname"]%></strong>：<br /><img src="/faces/1.gif" /> </td>
        <td><%= Convert.ToDateTime(dr["postdate"]).ToString("yyyy-MM-dd HH:mm") %> </td>
        <td width="110"><span style="padding-right:10px;"><%= Utils.MarkIP(dr["ip"] as string)%></span> </td>
    </tr>
    <tr bgcolor="<%= i % 2 == 0 ? "white" : "" %>" class="tr_btm_line">
        <td colspan="3" valign="top">
            <%= dr["content"].ToString().Replace("\r\n","<p>")%>
        </td>
    </tr><%} %>
</table>
<div class="pagestyle_simp mg_top"><a>上一页</a>
    <% for (int page = 1; page <= PageCount; page++)
       { %>
       <a <%= Request.QueryString["page"] == page.ToString() ? "class='act'" : "" %>><%= page%></a>
    <%} %><a>下一页</a>
</div>
<script type="text/javascript">
    $(".pagestyle_simp a").bind("click", function() {
        var page = 0;
        if($(this).text() == "上一页")
            page = <%= Convert.ToInt32(Request.QueryString["page"]) == 1 ? 1 : Convert.ToInt32(Request.QueryString["page"]) - 1 %>;
        else if ($(this).text() == "下一页")
            page= <%= Convert.ToInt32(Request.QueryString["page"]) == PageCount ? PageCount : Convert.ToInt32(Request.QueryString["page"]) + 1 %>;
        else
            page = $(this).text();
        GetNewsDiscus(false,<%= Request.QueryString["id"] %>,"","","",page);
    });
</script>
<%}else{ %>
    <div style="padding:10px;border:solid 1px #ccc; text-align:center;">暂无任何评论，赶快说两句吧。</div>
<%} %>