<%@ Page Language="C#" AutoEventWireup="true" CodeFile="dairy_see.aspx.cs" Inherits="dairy_see" validateRequest="false"%>

<!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 runat="server">
    <title>日记浏览</title>
    <LINK href="css/common.css" type=text/css rel=stylesheet>
</head>
<body>
    <form id="form1" runat="server" defaultbutton="plsend">
<table width="450" border="0" cellspacing="0" cellpadding="0" class="dairy_see">
  <tr>
    <td><div align="center"><strong><font size="2"><%=showdairy("dtitle")%></font></strong></div></td>
    </tr>
  <tr>
    <td><div align="center" >[ 类别：<%=showdairy("dclass")%> | 点击数：<%=showdairy("dbit")%> | 发布日期：<%=short_time(showdairy("dtime"))%> | 责任编辑：<%=showdairy("dwriter")%>] </div></td>
  </tr>
  <tr>
    <td style="padding-right:50px"><div align="right">
      <asp:Label ID="lbid" runat="server" Text="Label" Visible="False"></asp:Label>
      [<a href="#wrpl" class="daititle">发表评论</a> | <a href="#pl" class="daititle">查看评论</a> | <a href="javascript:history.back(-1)" class="daititle">返回</a>]</div></td>
  </tr>
</table>

    <div class="dairy_see" style="width:420px; height:460px; margin-left:0px; overflow-y:auto; overflow-x:auto;">
    <table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td style="padding-left:10px; padding-top:10px;word-break : break-all;"><%=htmlstr(showdairy("dcontent"))%></td>
          </tr>
      </table>
    <table width="420" border="0" cellpadding="0" cellspacing="0" style="margin-top:10px">
      <tr>
        <td style="padding-left:10px; padding-top:10px;">
        <a name="pl">评论：</a>        
          <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/line.jpg">
            <tr>
              <td><img src="images/line.jpg" width="237" height="1" /></td>
            </tr>
          </table>
		  <table width="420" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td>
            <% if (ispl(Convert.ToInt16(showdairy("id"))) == 1) { Response.Write("<div align=\"center\" class=\"huise\" style=\"padding-top:10px;padding-right:20px;\">暂无评论</div>"); }
               else
               { %>  
            <asp:DataList ID="DataList2" runat="server" DataKeyField="ID">
            <itemtemplate>
              <table width="420" border="0" cellspacing="0" cellpadding="0" style="margin-top:20px">
                <tr>
                  <td width="80" valign="top">
                  <%# usermsg(Convert.ToInt16(Eval("drwriter")))%>
                  </td>
                  <td width="370" valign="top"><table width="330" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="45" valign="top" style="word-break : break-all"><%# Convert.ToInt16(Eval("drunable")) == 1 ? "*******该留言被屏蔽*******" : Eval("drcontent")%></td>
                    </tr>
                    <tr>
                      <td><div align="right" class="huise" style="padding-right:20px;"><%# Eval("drtime") %></div></td>
                    </tr>
                  </table></td>
                </tr>
              </table>
            </itemtemplate>
           </asp:DataList>
           <%} %>
              </td>
            </tr>
          </table>


		  <table width="420" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:10px">
            <tr>
              <td style="padding-left:10px; padding-top:10px;"> 
              <a name="wrpl">发表评论:</a>              </td>
            </tr>
           <%if (Session["profile"].ToString() != "" && Session["pw"].ToString() != "" && Session["ad"].ToString() != "游客" && Session["profile"].ToString() != "前台管理员")
             {  %>
            <tr>
              <td style="padding-left:10px; padding-top:10px;word-break : break-all; height: 168px;">
                  <asp:TextBox ID="tbpl" runat="server" Height="126px" Width="340px" TextMode="MultiLine" SkinID="worm"></asp:TextBox>
                  <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbpl"
                      Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator><br />
                  验证码:<asp:TextBox ID="tbck" runat="server" Width="107px" SkinID="worm"></asp:TextBox>
                  <img alt="看不清？点击更换" onclick="this.src=this.src+'?'" src="VerifyCode.aspx" /><br />
                  <br />
                  <asp:Button ID="plsend" runat="server" Text="提交" BackColor="White" BorderColor="#E0E0E0" BorderStyle="Dotted" Width="60px" OnClick="plsend_Click" />
                  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                  <asp:Button ID="plreset" runat="server"　Text="重置" BackColor="White" BorderColor="#E0E0E0" BorderStyle="Dotted" Width="60px" /></td>
            </tr>
            <%}
              else
              {
            %>
            <tr>
              <td style="padding-left:10px; padding-top:10px;word-break : break-all;">请<a href="cuslogin.aspx" target="showup">登录</a>或<a href="cusreg.aspx" target="showup">注册</a>后发表评论!</td>
            </tr>
            <%} %>
          </table>
          
        </td>
      </tr>
    </table>
    </div>
</form>
</body>
</html>
