<%@ Page Language="C#" AutoEventWireup="true" Codebehind="group.aspx.cs" Inherits="JuSNS.Web.user.Group.Group" 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>
<title id="ptitle" runat="server">群内主题</title>
<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" src="../../js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="../../js/public.js"></script>
<script type="text/javascript" src="../../inc/editor/fckeditor.js"></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/group.gif" align="absmiddle" /> <span class="shenlan bold font14 ocolor" id="H2_GroupName" runat="server"></span>(<span id="P_Publicity" runat="server"></span>)</div>
                                <div class="r">
                                    
                                    <input type="text" class="f-text" id="myKey" runat="server" />
                                    <input type="button" class="f-button" value="搜索群组" onclick="self.location='list.aspx?GroupName='+escape(document.getElementById('myKey').value);" />
                                     
                                </div>
                                <div class="c"></div>
                            </div>
            		       
                            <div class="nav-menu">
                                <ul>
                                    <li><a href="../group">最新主题</a></li>
                                    <li><a href="../group/my.aspx?r=<%=ruser %>&a=join">我加入的群组</a></li>
                                    <li><a href="../group/my.aspx?r=<%=ruser %>&a=creat">我创建的群组</a></li>
                                    <li><a href="../group/list.aspx">好友群组</a></li>
                                    <li><a href="../group/list.aspx?r=all">随便看看</a></li>
                                    <li class="current"><a href="javascript:;">群内主题</a></li>
                                </ul>
                            </div>        
                     </div>   
                     
                     <div class="body_sec_all">
                             
                            <div class="content nl s100">
                                    <div class="nl s99"><div class="nl" id="showtitle" title="查看群组图片，群组成员及群组管理员！"><a href="javascript:showGroupinfo('groupinfo-div')">显示群详细资料</a></div><div class="group-navi nr"><ul class="acbg1" id="Ul_GroupAdminOp" runat="server"></ul></div></div> 
                                    <div class="pstr s99" id="groupinfo-div" style="display:none;">
                                            <div class="nl w110">
                                                <img id="Img_GroupHead" runat="server" width="100" />
                                            </div>
                                            <div class="nl w280">
                                                <div class="hdtitle bold w280">属性 <a id="A_Edit" runat="server">修改</a></div>
                                                <div id="P_GroupType" runat="server" class="pstr"></div>
                                                <div class="hdtitle bold w280">管理员</div>
                                                <div class="pstr">
                                                    <asp:Repeater ID="Rpt_GroupAdminList" runat="server">
                                                        <HeaderTemplate>
                                                        <div class="groupmember-admin">
                                                         <ul>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <li><a href="../../user/<%# JuSNS.Common.Public.URLWrite("","r",""+DataBinder.Eval(Container.DataItem, "UserID")+"")%>">
                                                                <%# DataBinder.Eval(Container.DataItem, "UserName")%>
                                                            </a>(<%# DataBinder.Eval(Container.DataItem, "Name")%>) 
                                                            <span id="owner"><%# getGradeName(DataBinder.Eval(Container.DataItem, "Grade"))%>
                                                            </span>
                                                         </li>
                                                        </ItemTemplate>
                                                        <FooterTemplate>
                                                            </ul>
                                                            </div>
                                                        </FooterTemplate>
                                                    </asp:Repeater>
                                                </div>
                                            </div>
                                            <div class="nr w320 padding10">
                                                <div class="hdtitle bold w320">共 <span id="Span_UserCount" runat="server"></span>个成员，<a id="A_AllMember" runat="server">所有成员</a></div>
                                                    <div class="pstr">
                                                        <asp:Repeater runat="server" ID="Rpt_MemberList">
                                                            <HeaderTemplate>
                                                            <div class="groupmember nl">
                                                             <ul>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <li>
                                                                    <a href="../../user/<%# JuSNS.Common.Public.URLWrite("","r",""+DataBinder.Eval(Container.DataItem, "UserID")+"")%>"><img src="<%# GetHeadImage(DataBinder.Eval(Container.DataItem, "UserID"))%>" alt="<%# DataBinder.Eval(Container.DataItem, "UserName")%>" width="48" height="48" title="<%# DataBinder.Eval(Container.DataItem, "UserName")%>" /><span><%# DataBinder.Eval(Container.DataItem, "UserName")%></span></a>
                                                                    
                                                                </li>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                </ul> </div>
                                                            </FooterTemplate>
                                                        </asp:Repeater>
                                                    </div>
                                            </div>
                                    </div>
                                    
                                    <!--群组相册-->
                                    <div id="gp_album" class="content" runat="server">
                                        <div class="hdtitle nl s100"><span class="nl"><a href="../group/album.aspx?GroupID=<%=usergroupinfo.GroupID %>">群组相册</a></span><span class="nr"><a href="/home/group/album.aspx?GroupID=<%=usergroupinfo.GroupID %>">更多...</a></span></div>
                                        <div id="Div_Album" runat="server">
                                            <asp:DataList runat="Server" ID="groupalbum">
                                                <ItemTemplate>
                                                    <a href="../album/photoview.aspx?r[0]=<%# DataBinder.Eval(Container.DataItem, "PhotoID") %>"><img src="<%# this.GetSmallPic((string)DataBinder.Eval(Container.DataItem, "FilePath"),2)%>" alt="<%# DataBinder.Eval(Container.DataItem, "Description") %>"/></a>
                                                </ItemTemplate>
                                            </asp:DataList>
                                        </div>
                                  </div>
                                    
                                    <div class="group-content nl">
                                            <div class="content content-bull" style="width:730px;"><span class="reshow">公告：</span> <span id="Div_sect" runat="server"></span></div>
                                            <div class="recordnumber w320">共 <span id="span_DiscussCount" runat="server"></span>个主题</div>
                                            <asp:Repeater ID="Rpt_DiscussList" runat="server">
                                                <HeaderTemplate>
                                                <div class="tn nl">
                                                    <div class="title nl">主题</div>
                                                    <div class="author nl">作者</div>
                                                    <div class="replay nl">回复数</div>
                                                    <div class="replier nl">最后发言</div>
                                                </div>
                                                <div class="c"></div>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                <div class="tcn nl">
                                                    <div class="title nl">      
                                                            <a href="Topic.aspx?DisID=<%# DataBinder.Eval(Container.DataItem, "ID")%>">
                                                                <%# getIsTop(DataBinder.Eval(Container.DataItem, "TopNum"))%>
                                                                <%# DataBinder.Eval(Container.DataItem, "Topic")%>
                                                            </a>
                                                   </div>
                                                    <div class="author nl">    
                                                            <a href="/user/<%# JuSNS.Common.Public.URLWrite("","r",""+DataBinder.Eval(Container.DataItem, "UserID")+"")%>">
                                                                <%# DataBinder.Eval(Container.DataItem, "UserName")%>
                                                            </a>                                                   
                                                   </div>
                                                   <div class="replay nl">
                                                   <%# DataBinder.Eval(Container.DataItem, "Replys")%>
                                                   </div>
                                                   <div class="replier nl">
                                                        <%# getUserName(DataBinder.Eval(Container.DataItem, "LastPoster"))%>
                                                            <span class="time">
                                                                <%# getTime(DataBinder.Eval(Container.DataItem, "LastPostTime"), DataBinder.Eval(Container.DataItem, "ID"))%>
                                                            </span>                                                   
                                                    </div>
                                                </div>                                           
                                                </ItemTemplate>
                                                <FooterTemplate>
                                                    </div>
                                                </FooterTemplate>
                                            </asp:Repeater>
                                            <div class="pagination" runat="server" id="DivPage"></div>                                    
                                         </div>
                                     <%if(isGroupHead){ %>
                                    <form id="form1" runat="server">
                                     <div class="pstr s99" id="isPost" runat="server">
                                            <a name="posttopic"></a> 
                                            <div class="bold s100 font14 hdtitle">发表话题</div>
                                            <div class="spline"></div>
                                             <div class="msg-error" id="div_Error" runat="server" style="display: none;"></div>
                                            <div class="content">
                                                <label class="f-label">
                                                标题
                                                </label>
                                               <input type="text" class="f-text s50" runat="server" id="Topic" maxlength="40" size="60" /> 
                                            </div>
                                            <div class="content">
                                                <label class="f-label">
                                                内容
                                                </label>
                                                <script type="text/javascript" language="javascript">
                                                    window.onload = function()
                                                    {
                                                        var sBasePath = "../../inc/editor/"
                                                        var oFCKeditor = new FCKeditor('Content') ;
                                                        oFCKeditor.BasePath	= sBasePath ;
                                                        oFCKeditor.Width = '88%' ;
                                                        oFCKeditor.ToolbarSet = 'Basic';
                                                        oFCKeditor.Height = '180' ;	
                                                        oFCKeditor.ReplaceTextarea();
                                                    }
                                                 </script>
                                                <textarea runat="server" rows="10" name="Content" class="f-text" id="Content" style="width: 350px; height: 200px;display:none;"></textarea>
                                            </div>
                                            <div class="content">
                                                <label class="f-label">
                                                &nbsp;
                                                </label>
                                                    <asp:HiddenField ID="Hid_GroupID" runat="server" />
                                                    <asp:Button ID="Button1" runat="server" Text="发表话题"  CssClass="f-button" OnClick="Button1_Click" />
                                            </div>
                                     </div>
                                    </form>
                                    <%}else{ %>
                                    <div class="msg-warn">您需要上传了头像后，才能 <b>发表主题</b>！，现在开始<a href="../space/userheadphoto.aspx">上传头像</a></div>
                                    <%} %>
                            </div>
                     </div>
                     </div>
                       <!--底部-->
                     <div class="divbottom">
                      <%=this.GetHtmlFoot()%>
                      </div>                         
         </div>
     </div>
</div>
</body>
</html>
<script type="text/javascript">
    function showGroupinfo(gid)
   {
        var dgid=document.getElementById(gid);
        if(dgid.style.display=="none")
        {
            dgid.style.display="";
            document.getElementById("showtitle").innerHTML="<a href=\"javascript:showGroupinfo('groupinfo-div')\">隐藏群详细资料</a>";
        }
        else
        {
            dgid.style.display="none";
            document.getElementById("showtitle").innerHTML="<a href=\"javascript:showGroupinfo('groupinfo-div')\">显示群详细资料</a>";
        }
        
   } 
</script>
