<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="JuSNS.Web.home.mood.index" %>
<%@ Import Namespace="System.Data" %>
<!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>
<title id="ptitle" runat="server"> 心情</title>
<script language="javascript" type="text/javascript" src="../../js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="../../js/public.js"></script>
<link href="../../template/<% Response.Write(JuSNS.Config.UiConfig.SkinStyle); %>/css/base.css" id="skinpath" type="text/css" rel="stylesheet" />
 <script language="javascript" type="text/javascript">
<!--
    function Delete(id)
    {
        var  options={
        method:'post',
        parameters:"Option=Delete&ID="+ id,
        onComplete:
        function(transport)
            {
                var retv =transport.responseText;
                if(retv == '1')
                {
                    document.getElementById('miniblg').removeChild(document.getElementById('li_'+ id));
                    closeConfirm();
                }
            }
        }
      new  Ajax.Request('index.aspx',options);
    }
    //-->
    </script>   
</head>
<body>
<!--头部-->
<%=this.GetHtmlShort()%>
<div id="divhead">
    <%=this.GetHtmlHead()%>
</div>

<div id="divbody">
    <div id="body_first">
        <div class="body_menu"> 
        <%=this.GetHtmlLeft()%>
        </div>
    </div>
    <div id="body_sec">
            <div id="body_mid"> 
                <div class="body_frame"> 
                     <!--主题内容中-->    
                        <div class="body_frame_otherinfo">
	                            <div class="title">
                                    <div class="l"><img src="../../template/<%Response.Write(JuSNS.Config.UiConfig.SkinStyle); %>/images/site/mood.gif" align="absmiddle" /> <span class="bold shenlan font14 ocolor"><% if (Request.QueryString["f"] == "1"){%>随便看看：心情日记<%}else{ %><%=userName %>心情日记<%} %></span></div>
                                    <div class="r"><a href="javascript:window.history.back();" title="返回上一页">返回上一页</a></div>
                                    <div class="c"></div>
                                </div>
                		       
                                <div class="nav-menu">
                                    <ul>
                                <%if (Request.QueryString["f"] == "1")
                                  {%>
                                     <li><a href="../ram/net.aspx">随便看看</a></li>
                                     <li><a href="../ram">同城</a></li>
                                     <li><a href="../network?s=ram&f=0">同地区</a></li>
                                     <li class="current"><a href="../ram/day.aspx">日记</a></li>
                                     <li><a href="../ram/blog.aspx">日志</a></li>
                                     <li><a href="../ram/photo.aspx">相册</a></li>
                                     <li><a href="../ram/share.aspx">分享</a></li>
                                     <li><a href="../ram/group.aspx">群组</a></li>
                                     <li><a href="../ram/vodie.aspx">电影</a></li>
                                    <li><a href="../ask/?r=all&f=1">问答</a></li>
                               <%}
                                 else
                                 { %>                                       
                                     <li id="fDiv" runat="server"><a href="../mood">朋友的心情日记</a></li>
                                     <li id="myDiv" runat="server"><a href="../mood/?r=my">我的心情日记</a></li>
                                     <li id="allDiv" runat="server"><a href="../mood/?r=all">所有心情日记</a></li>
                                    <%} %> 
                                     </ul>
                                </div>        
                         </div>
                        <div class="body_sec_left">
                               <div runat="server" id="DivMsg" class="msg-succ" visible="false"></div>
                               <div runat="server" id="DivMsg1" class="msg-error" visible="false"></div>
                              <div class="content" runat="server" id="isPostMood">
                                   <form action="../mood/index.aspx" method="post">
                                      <p class="item">我在做什么？您想说什么？</p>
                                      <p class="item">
                                      <textarea name="TxtContent" rows="4" class="f-text s97" id="TxtContent"></textarea>
                                      </p>  
                                      <p class="pstr">
                                      <a href="javascript:void(0);"  id="face" onclick="showface(this.id,'TxtContent',0);"><img src="../../template/images/face/c.gif" title="选择表情"  align="absmiddle" /></a> 
                                      &nbsp;<%Response.Write(sList); %> &nbsp;    
                                      <input type="hidden" name="Action" value="Submit" /><input  type="submit" id="PostMoodButton" runat="server" class="f-button" value="发布我的心情日记" /> 字数不能超过250个字符。
                                      </p>  
                                  </form>   
                            </div>
                           
                         <div class="recordnumber">共<asp:Literal runat="server" ID="LtrNum"></asp:Literal>篇心情日记</div>
                        <!--正文开始-->
                        <div class="content nl">
                            <asp:Repeater runat="server" ID="RptData">
                                <HeaderTemplate>
                                 <ul  id="miniblg">
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <li id="li_<%# ((DataRowView)Container.DataItem)["ID"] %>">
                                            <%if (!isMy)
                                              {%>
                                            <div class="body-m-left image nl">
                                                <a href="../../user/<%# JuSNS.Common.Public.URLWrite("","r",""+((DataRowView)Container.DataItem)["UserID"]+"")%>"><img src="<%# GetHeadImage(((DataRowView)Container.DataItem)["UserID"],1)%>"  alt="<%# DataBinder.Eval(Container.DataItem, "UserName")%>" style="width: 48px;height: 48px;" /></a>
                                                <a name="re_<%# ((DataRowView)Container.DataItem)["ID"]%>" id="re_<%# ((DataRowView)Container.DataItem)["ID"]%>"></a>
                                           </div>
                                           <div class="body-m-right nl">
                                          <%}
                                            else
                                            {%> 
                                            <div class="pstr nl s96" style="padding-right:8px;">
                                            <%} %>
                                                <div class="cpstr">
                                             <div class="hdtitle s100 nl"> 
                                                <div class="nl"> 
                                                 <%if (!isMy)
                                                  {%>
                                                    <a href="../../user/<%# JuSNS.Common.Public.URLWrite("","r",""+((DataRowView)Container.DataItem)["UserID"]+"")%>"><b><%# ((DataRowView)Container.DataItem)["UserName"]%></b></a>
                                                <%} else{%>
                                                你更新于
                                                <%} %>
                                                        <span id="bb<%# ((DataRowView)Container.DataItem)["ID"]%>">
                                                            <span class="time"><%# JuSNS.Common.Public.getTimeSpan((DateTime)((DataRowView)Container.DataItem)["PostTime"])%></span>
                                                        </span>
                                                        <span><a href="javascript:void(0);" <%=checkstr %> onclick="showCommentJS('<%# ((DataRowView)Container.DataItem)["ID"]%>','mini_ID_<%# ((DataRowView)Container.DataItem)["ID"]%>','1');">
                                                             回复(<%# ShowComment(((DataRowView)Container.DataItem)["ID"])%>)</a>  
                                                         </span>
                                                 </div>
                                                  <%# ShowDel(((DataRowView)Container.DataItem)["UserID"],((DataRowView)Container.DataItem)["ID"])%>
                                                </div>
                                                </div>
                                                <div class="pstr">
                                                    <%# ShowType(((DataRowView)Container.DataItem)["MType"])%><%# JuSNS.Common.Public.CheckSma(((DataRowView)Container.DataItem)["Content"].ToString())%> 
                                               </div>
                                                <div id="mini_ID_<%# ((DataRowView)Container.DataItem)["ID"]%>" class="moodcomment">
                                                    <%# ((DataRowView)Container.DataItem)["ID"]%>
                                                </div>
                                           </div> 
                                          <%if (!isMy){%> 
                                          <div class="spline"></div> 
                                          <%} %>
                                    </li>
                                </ItemTemplate>
                                <FooterTemplate>
                                    </ul>
                                </FooterTemplate>
                            </asp:Repeater>
                            <!--分页开始-->
                            <div class="pagination" runat="server" id="DivPage"></div> 
                           <div class="spline"></div> 
                       </div>                    
                         <!--正文结束-->
                        </div>
                        <!--中间分隔-->
                        <div class="line_mid">
                          <div class="line_01"></div>
                          <div class="line_02" id="midline"></div>
                          <div class="line_03"></div>
                        </div>
                        <!--中间分隔结束-->
                        
                        
                        <!--右边导航-->
                        <div class="body_sec_right">
                            <div class="adscss">
                                <script type="text/javascript" src="../../js/ads/body_top.js"></script>
                            </div> 
			                        
                            <div class="ctitle">&bull; 心情：</div>
                            <div class="content"> 一句话表达您的目前心情和您想说的话！您的好朋友，都可以看见！</div>
			   
                            <div class="adscss">
                                <script type="text/javascript" src="../../js/ads/body.js"></script>
                            </div>
                        </div>
                        <!--右边导航结束-->
                         <div class="c"></div>
               </div>
               <!--底部-->
                 <div class="divbottom">
                  <%=this.GetHtmlFoot()%>
                  </div>
           </div>
   </div>
</div>
</body>
</html>
<script type="text/javascript">
    function unlogin()
   {
        alert("需要登录后才能查看！");
   } 

   var urlPoint =location.href;
   if(urlPoint.indexOf("#re")>-1)
   {
        var mid=urlPoint.substring((urlPoint.indexOf("#re")+4));
        if(document.getElementById("mini_ID_"+mid)!=null)
        {
            document.getElementById("mini_ID_"+mid).style.display="block";
            showCommentJS(''+mid+'','mini_ID_'+mid+'','1');
            if(document.getElementById("conent_"+mid)!=null)
            {
                document.getElementById("conent_"+mid).focus();
            } 
        }
   }

</script>