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

<!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 id="Head1" runat="server">
    <title>无标题页</title>
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
  <meta name="author" content="fullahead.org - studio7designs.com" />
  <meta name="description" content="4U blog" />
  <meta name="keywords" content="blog system" />
  <meta name="robots" content="index, follow, noarchive" />
  <meta name="googlebot" content="noarchive" />

  <link rel="stylesheet" type="text/css" href="css/layout.css" media="screen, projection, tv " />
  <link rel="stylesheet" type="text/css" href="css/html.css" media="screen, projection, tv " />

  
  <style type="text/css">
<!--
.style2 {color: #627E9A}
.style3 {color: #62CC3C}
.style6 {color: #5C8096}
-->
  </style>
<script language="javascript" type="text/javascript">
// <!CDATA[

function boarderhead_onclick() {

}



function headerImg_onclick() {

}

// ]]>
</script> 
</head>
<body>
    <form id="form1" runat="server">
<!-- #content: holds all except site footer - causes footer to stick to bottom -->
<div id="content" style="left: 0px; top: 0px;">

  <!-- #header: holds the logo and top links -->   
  <div id="header" class="width floatRight" style="left: 1px; top: 0px; width: 895px;">
  
  
    <ul>      
      <li></li>        
      <li><asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/Index.aspx">首页</asp:LinkButton></li> 
      <li><asp:LinkButton ID="LinkButton2" runat="server" PostBackUrl="~/login.aspx">登陆</asp:LinkButton></li> 
      <li><asp:LinkButton ID="LinkButton3" runat="server" PostBackUrl="~/CreatUser.aspx">注册</asp:LinkButton></li> 
      <li class="last"><asp:LinkButton ID="LinkButton4" runat="server" PostBackUrl="~/Help.aspx" >帮助</asp:LinkButton></li> 
    </ul>
      <div style="z-index: 101; left: 486px; width: 263px; position: absolute; top: 35px;
          height: 23px">
          <asp:Label ID="Label2" runat="server" Text="欢迎您：" ForeColor="#CCCCCC"></asp:Label>
          <asp:LoginName ID="LoginName1" runat="server" ForeColor="#CCCCCC" />
          &nbsp;&nbsp; &nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
              Text="进入管理中心" /></div>

  </div>
  <!-- #header end -->


  <!-- #headerImg: holds the main header image or flash -->
  <div id="headerImg" class="width" style="width: 870px" onclick="return headerImg_onclick()"></div>




  



  <!-- #page: holds the page content -->
  <div id="page" class="widthPad">



    <!-- #columns: holds the columns of the page -->
    <div id="columns" class="widthPad">
    
    <!-- Left thumbnail column -->
    <div class="floatLeft width8">

      
          &nbsp;
   
		 <p> <a href="Index.aspx" class="thumb"><img src="images/buttonHome.gif" alt="thumbnail"/></a>&nbsp;</p>
        <p> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/buttonLog.gif" OnClick="ImageButton1_Click" Height="70px" Width="72px" />
        </p>
    </div>
    <!-- Left thumbnails end -->



    <!-- Center news column -->
    <div class="floatLeft width62 board">
   <div id="boarderhead" class="width100" onclick="return boarderhead_onclick()">
  
  </div>
  <div id="boardermid" class="width90 height800">
      <h1><img src="images/bloglistpic.gif" alt="日志列表" /></h1>


      <!-- Start Post -->
      <div class="post" style="left: 0px; top: 0px">
      
          <asp:DataList ID="DataList3" runat="server" DataKeyField="log_id"
              DataSourceID="SqlDataSource2">             
          
              <ItemTemplate>
                  <p><span class="title"><%# Eval("log_title") %></span></p>
                  <p><%# Eval("contents") %>&nbsp;</p>
              </ItemTemplate> 
            
          </asp:DataList>

      </div>
      <!-- End Post -->
<h2 style="color: #052c4d"><img src="images/whitesymbol.gif" alt="`" />评论</h2>
      <div class="comment" style="left: 0px; top: 0px">

        
             <asp:DataList ID="DataList1" runat="server" DataKeyField="comment_id" DataSourceID="SqlDataSource1">
                <ItemTemplate>
                <div style="border: dotted 1px #052c4d; width:500px">
                    
                    
                    <p class="marginText" style="border:none; width:480px">
                        <%# Eval("contents") %><br />
                    </p><p style="border-top:solid 1px #aaa ">
                        回复者：<%# Eval("author") %>
                        回复时间： <%# Eval("pub_date") %></p>
                   </div> &nbsp
                </ItemTemplate>
            </asp:DataList>&nbsp;</div>
      <!-- End Comments -->
      
<h2 style="color: #052c4d"> <img src="images/whitesymbol.gif" alt="`" style="width: 16px; height: 15px" />发表评论</h2>
      <!-- Start Post Comments -->
      <div class="comment" style="left: 0px; top: 0px">
      
        <p>
    <asp:TextBox ID="Txtcont" runat="server" Height="132px" Width="478px" ValidationGroup="comment" TextMode="MultiLine"></asp:TextBox>
          &nbsp;&nbsp; &nbsp;&nbsp;
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="Txtcont"
                ErrorMessage="请输入回复内容" ValidationGroup="comment"></asp:RequiredFieldValidator></p>
          <p>
          
    <asp:Label ID="Label1" runat="server" Text="评论者姓名" Width="72px"></asp:Label>&nbsp;
    <asp:TextBox ID="TxtAu" runat="server"
        Width="151px" ValidationGroup="comment">4UBlog博友</asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtAu"
        ErrorMessage="*" ValidationGroup="comment"></asp:RequiredFieldValidator>
              &nbsp; &nbsp; &nbsp;
    <asp:Button ID="BtnPub" runat="server" OnClick="BtnPub_Click" Text="发表评论" Width="105px" ValidationGroup="comment" /></p>

      </div>
      
</div>
    </div>
    <!-- Center news column end -->
	
    <!-- Right link column -->
    <div class="floatRight width25 blueBg horzPad" id="DIV1" onclick="return DIV1_onclick()" style="left: -9px; position: relative; top: 3px">

      <h2 style="border: none" class="light"><img src="images/dkbluebutton.gif" alt="`" /><span class="light">
          其他日志</span></h2>

      <ul>
        <asp:DataList ID="DataList4" runat="server" DataKeyField="log_id" DataSourceID="SqlDataSource5">
            <ItemTemplate>
                <li><h3><a href="LogDetail.aspx?log_id=<%# Eval("log_id") %>"><%# Eval("log_title") %></a></h3></li>
            </ItemTemplate>
        </asp:DataList>        
      </ul>

      



      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

      <h2 style="border: none"><img src="images/dkbluebutton.gif" alt="`" /><span class="light">友情连接</span></h2>

      <ul class="submenu2">
        <asp:DataList ID="DataList2" runat="server" DataKeyField="link_id" DataSourceID="SqlDataSource3">
                <ItemTemplate>
                    <li>
                    <a href='http://<%# Eval("link_url") %>'><%# Eval("link_name") %></a>
                    </li>
                </ItemTemplate>
            </asp:DataList>
	  </ul>

    </div>
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:DesertEagleConnectionString %>"
            OnSelected="SqlDataSource4_Selected" SelectCommand="SELECT [bloger_name] FROM [DE_logs] WHERE ([log_id] = @log_id)">
            <SelectParameters>
                <asp:QueryStringParameter Name="log_id" QueryStringField="log_id" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    <!-- Right links column end -->
        <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:DesertEagleConnectionString %>"
            OnSelecting="SqlDataSource5_Selecting" SelectCommand="SELECT TOP 5 [bloger_name], [log_title], [click_count], [log_id], [is_hide] FROM [DE_logs] WHERE (([bloger_name] = @bloger_name) AND ([is_hide] = @is_hide))">
            <SelectParameters>
                <asp:Parameter Name="bloger_name" Type="String" />
                <asp:Parameter DefaultValue="False" Name="is_hide" Type="Boolean" />
            </SelectParameters>
        </asp:SqlDataSource>

</div>

    <!-- #columns end -->
	

  </div>   

  <!-- #page end -->
   </div>
<!-- #content end -->




<!-- #footer: holds the site footer (logo and links) -->
<div id="footer">

  <!-- #bg: applies the site width and footer background -->
  <div id="bg" class="width">
  
  
    <ul>
      <li><a href="">Sitemap</a></li>
      <li><a href="">Register</a></li>
      <li><a href="">Design inspired by</a></li>
      <li><a href="http://www.studio7designs.com" class="last">studio7designs.com</a></li>
	</ul>

  </div>
  <!-- #bg end -->
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DesertEagleConnectionString %>"
        SelectCommand="SELECT * FROM [DE_comment] WHERE ([log_id] = @log_id)" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [DE_comment] WHERE [comment_id] = @original_comment_id AND [contents] = @original_contents AND [author] = @original_author AND [pub_date] = @original_pub_date AND [log_id] = @original_log_id" InsertCommand="INSERT INTO [DE_comment] ([contents], [author], [pub_date], [log_id]) VALUES (@contents, @author, @pub_date, @log_id)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [DE_comment] SET [contents] = @contents, [author] = @author, [pub_date] = @pub_date, [log_id] = @log_id WHERE [comment_id] = @original_comment_id AND [contents] = @original_contents AND [author] = @original_author AND [pub_date] = @original_pub_date AND [log_id] = @original_log_id" OnInserting="SqlDataSource1_Inserting" OnSelecting="SqlDataSource1_Selecting">
        <DeleteParameters>
            <asp:Parameter Name="original_comment_id" Type="Int32" />
            <asp:Parameter Name="original_contents" Type="String" />
            <asp:Parameter Name="original_author" Type="String" />
            <asp:Parameter Name="original_pub_date" Type="DateTime" />
            <asp:Parameter Name="original_log_id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="contents" Type="String" />
            <asp:Parameter Name="author" Type="String" />
            <asp:Parameter Name="pub_date" Type="DateTime" />
            <asp:Parameter Name="log_id" Type="Int32" />
            <asp:Parameter Name="original_comment_id" Type="Int32" />
            <asp:Parameter Name="original_contents" Type="String" />
            <asp:Parameter Name="original_author" Type="String" />
            <asp:Parameter Name="original_pub_date" Type="DateTime" />
            <asp:Parameter Name="original_log_id" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:Parameter Name="log_id" Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="contents" Type="String" />
            <asp:Parameter Name="author" Type="String" />
            <asp:Parameter Name="pub_date" Type="DateTime" />
            <asp:Parameter Name="log_id" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:DesertEagleConnectionString %>"
        OnSelecting="SqlDataSource2_Selecting" SelectCommand="SELECT * FROM [DE_logs] WHERE ([log_id] = @log_id)">
        <SelectParameters>
            <asp:QueryStringParameter Name="log_id" QueryStringField="log_id" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:DesertEagleConnectionString %>"
        OnSelecting="SqlDataSource3_Selecting" SelectCommand="SELECT * FROM [DE_link] WHERE ([bloger_name] = @bloger_name)">
        <SelectParameters>
            <asp:Parameter Name="bloger_name" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>

</div>
<!-- #footer end -->
    </form>
</body>
</html>

