<%@ Page Language="C#" AutoEventWireup="true" CodeFile="msg.aspx.cs" Inherits="msg" EnableEventValidation="false" 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>
	
<SCRIPT   LANGUAGE="JavaScript">   
  <!--   //缩略图js函数
    function setImg(img,   tWidth,   tHeight)
  {
  if(img.height>tHeight || img.width>tWidth)
  {
            if (tWidth >= tHeight)
            {
                img.height = parseInt(Math.floor(parseFloat(img.height) * (parseFloat(tWidth)
                /parseFloat(img.width))));
				img.width=tWidth;
            }
            else
            {
                img.width = parseInt(Math.floor(parseFloat(img.width) * (parseFloat(tHeight)
                / parseFloat(img.height))));
				img.height=tHeight;
            }
  }
  }
  //-->   
</SCRIPT>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <div class="m73" style="width:400px; height:500px; margin-left:10px; overflow-y:auto; overflow-x:hidden;"  align="left">
	    <asp:DataList ID="DataList1" runat="server" DataKeyField="ID" OnItemCommand="DataList1_ItemCommand">
          <itemtemplate>
            <table cellspacing="0" cellpadding="0" width="375" border="0">
              <tbody>
                <tr>
                  <td width="68" align="left" valign="top" ><div align="center">
                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td colspan="2" style="padding-top:0px;"><div align="center"><img src="<%# DataBinder.Eval(Container.DataItem,"chead")%>" /></div></td>
                        </tr>
                        <tr>
                          <td width="37%" style="padding-top:8px;"><div align="right"><img src="<%# DataBinder.Eval(Container.DataItem,"csex").ToString() == "女" ? "images/icon/Female.gif" : "images/icon/Male.gif"%>" width="16" height="16" alt="<%# DataBinder.Eval(Container.DataItem,"csex").ToString()%>" style="cursor:hand;"/></div></td>
                          <td width="63%" style="padding-top:8px;"><div align="left"><%# level(Convert.ToInt32(Eval("csend")))%></div></td>
                        </tr>
                        <tr>
                          <td colspan="2" style="padding-top:3px"><div align="center"><%# DataBinder.Eval(Container.DataItem,"cname")%></div></td>
                        </tr>
                        <tr>
                          <td colspan="2" style="padding-top:3px"><div align="center"><font class="dairy_see" style="font-size:11px"><%# DataBinder.Eval(Container.DataItem, "clei").ToString() == "Vip会员" ? Eval("clei").ToString() : ""%></font></div></td>
                        </tr>
                      </table>
                  </div></td>
                  <td width="312" align="left" valign="top" ><table width="96%" height="100%" border="0" align="right" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="54%" style="word-break:break-all;">标题：<%# DataBinder.Eval(Container.DataItem,"title")%></td>
                        <td width="46%"><div align="right">
						&nbsp;<img src="images/icon/icon_profile.gif" width="16" height="16" alt="<%# DataBinder.Eval(Container.DataItem,"cname")%>" style="cursor:hand;"/>
						&nbsp;<img src="images/icon/icon_homepage.gif" width="16" height="16" alt="<%# DataBinder.Eval(Container.DataItem,"caddress")%>" style="cursor:hand;"/> 
						&nbsp;<img src="images/icon/icon_editor_oicq.gif" width="16" height="16" alt="<%# DataBinder.Eval(Container.DataItem,"cqq")%>" style="cursor:hand;"/> 
						&nbsp;<img src="images/icon/icon_email.gif" width="16" height="16" alt="<%# DataBinder.Eval(Container.DataItem,"cmail")%>" style="cursor:hand;"/> 
                        <%
                            if (Convert.ToString(Session["profile"]) == "前台管理员")
                        {
                        %>
                        &nbsp;<asp:LinkButton ID="call" runat="server" CommandName="recall"><img src="images/icon/icon_reply_topic.gif" width="16" height="16" border="0" alt="回复"/></asp:LinkButton>
                        <asp:LinkButton ID="LinkButton1" runat="server" CommandName="DRdel">
					    &nbsp;<img src="images/icon/icon_delete_reply.gif" border="0" alt="删除" onclick="javascript:{if(confirm('是否确认删除此留言?')){return true;}return false;}"/></asp:LinkButton>&nbsp;
                        <%} %>
                        </div></td>
                      </tr>
                      <tr>
                        <td colspan="2" style="padding-left:0px; padding-top:8px;word-break:break-all"><%# wormubb.ubb.UBBToHTML(Eval("content").ToString())%></td>
                      </tr>
                      <tr>
                        <td height="40" colspan="2" align="right" style="padding-right:5px; padding-top:8px">发布时间：<%# short_time(Eval("times"))%></td>
                      </tr>
                      <%# replay(Eval("recall").ToString())%>
                      
                  </table></td>
                </tr>
                <tr>
                  <td height="5" colspan="2" align="left" style="padding-top:2px; padding-bottom:10px">---------------------------------------------------------------------------------------------</td>
                </tr>
                <tr>
                  <td colspan="2" class="m740"></td>
                </tr>
              </tbody>
            </table>
          </itemtemplate>
	      </asp:DataList>
	  </div>
		  <table  cellspacing="0" cellpadding="0" class="m73" style="margin-left:70px">
		  <tr>
		  <td style="padding-top:8px">
          当前
          <asp:Label ID="curpage" runat="server" Text="1"></asp:Label>
          /
          <asp:Label ID="allpage"
        runat="server" Text="Label"></asp:Label>
          页
          <asp:LinkButton ID="first" runat="server" OnClick="first_Click">首页</asp:LinkButton>
          <asp:LinkButton ID="pre" runat="server" OnClick="pre_Click">上一页</asp:LinkButton>
          <asp:LinkButton ID="next" runat="server" OnClick="next_Click">下一页</asp:LinkButton>
          <asp:LinkButton ID="last" runat="server" OnClick="last_Click">尾页</asp:LinkButton>
          &nbsp; 转到:
          </td>
		      <td>
              <asp:DropDownList ID="pagelist" runat="server" ForeColor="#736f57" BackColor="White" Font-Size="XX-Small" AutoPostBack="True" OnSelectedIndexChanged="downchange" Height="8px">              </asp:DropDownList>              </td>
		  </tr>
		 </table>
    </div>
    </form>
</body>
</html>
